package com.lw.tem.service.temservice.handler;


import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.stereotype.Component;

@Component
public class TemBlockHandler {

    // 处理快速下单流量控制阻塞的方法
    public static String handleQuickBlock(BlockException ex) {
        System.out.println("Blocked");
        return "Flow control limit reached! Please try again later.";
    }

    // 处理创建订单流量控制阻塞的方法
    public static  String handleCreateOrderBlock(BlockException ex) {
        return "Blocked create order: " + ex.getClass().getSimpleName();
    }
}